{template paome_header}
<link rel="stylesheet" href="static/calendar/js/calendar.css" />
<script type="text/javascript" charset="utf-8" src="static/calendar/calendar.php"></script>
<style type="text/css">
    .bg{display:none;position:fixed;width:100%;height:100%;background:#000;z-index:2;top:0;left:0;opacity:0.7;}
</style>
<h4 style="padding-left:10px;;">
    <a href="?c=paome_index&a=getPaomeList"><span>赛季列表</span></a>
    >>
    <span>个人列表</span>
</h4>
<form class="form-horizontal" method="POST" action="?c=paome_club&a=getUserList&paomeId={$paomeId}"  >
    <div class="control-group search-group">
        <label class="control-label" >用户昵称：</label>
        <div class="controls">
            <input type="text" value="{$name}" name="name" placeholder="用户昵称" />
        </div>
    </div>

    <div class="control-group search-group">
        <label class="control-label" >俱乐部：</label>
        <div class="controls">
            <input type="text" value="{$clubName}" name="clubName" placeholder="俱乐部昵称" />
        </div>
    </div>

    <div class="control-group search-group">
        <label class="control-label" >赛季阶段：</label>
        <div class="controls">
            <select name="contestStatus" id="contestStatus">
                <option value="0">全部</option>
                {loop $arrStatus $k $v}
                <optgroup label="{$v['name']}">
                    {loop $v['child'] $k2 $v2}
                    <option value="{$v2['id']}" {if $contestStatus == $v2['id']}selected{/if} >{$v2['name']}</option>
                    {/loop}
                </optgroup>
                {/loop}
            </select>
        </div>
    </div>

   <!-- <div class="control-group search-group">
        <label class="control-label" >竞赛状态：</label>
        <div class="controls">
            <select name="contestStatus2" id="contestStatus2">
                <option value="0">全部</option>
                <option value="1" {if $contestStatus2 == 1}selected{/if} >竞赛中</option>
                <option value="2" {if $contestStatus2 == 2}selected{/if} >招募中</option>
                <option value="3" {if $contestStatus2 == 3}selected{/if} >已淘汰</option>
                <option value="4" {if $contestStatus2 == 4}selected{/if} >已结束</option>
            </select>
        </div>
    </div>-->

    <div class="control-group search-group">
        <label class="control-label" >状态：</label>
        <div class="controls">
            <select name="status" id="status">
                <option value="0">全部</option>
                <option value="1" {if $status == 1 } selected {/if}>正常</option>
                <option value="2" {if $status == 2 } selected {/if}>待审核</option>
                <option value="5" {if $status == 5 } selected {/if}>退出</option>
            </select>
        </div>
    </div>



    <!--<div class="control-group search-group">-->
        <!--<label class="control-label" >赛绩：</label>-->
        <!--<div class="controls">-->
            <!--<select name="contestStatus3" id="contestStatus3">-->
                <!--<option value="0">全部</option>-->
                <!--<option value="1" {if $contestStatus3 == 1}selected{/if} >跑量榜由高到底</option>-->
                <!--<option value="2" {if $contestStatus3 == 2}selected{/if} >配速榜由高到底</option>-->
                <!--<option value="3" {if $contestStatus3 == 3}selected{/if} >人气榜由高到低</option>-->
                <!--<option value="4" {if $contestStatus3 == 4}selected{/if} >最远跑量由高到低</option>-->
            <!--</select>-->
        <!--</div>-->
    <!--</div>-->

    <div class="control-group search-group">
        <label class="control-label" >加入时间：</label>
        <div class="controls">
            <select name="addTimeType" id="addTimeType">
                <option value="0">全部</option>
                <option value="1" {if $addTimeType == 1}selected{/if} >加入时间倒序</option>
                <option value="2" {if $addTimeType == 2}selected{/if} >加入时间正序</option>
            </select>
            <input class="btn" type="submit" value="查询" />
        </div>
    </div>
</form>

<div class="bs-docs-example table-align pt-15" style="clear:both;">
    <table class="table table-striped table-align">
        <thead>
        <tr>
            <th>用户昵称</th>
            <th>用户logo</th>
            <th>俱乐部昵称</th>
            <th>状态</th>
            <th>截止赛事阶段</th>
            <th>个人数据</th>
            <th>加入时间</th>
            <th>操作</th>
        </tr>
        </thead>
        {if count($list)>0}
        <tbody>
        {loop $list $k $v}
            <tr>
                <td>{$v['userNickName']}</td>
                <td><img src="{$v['userHeader']}" style="width: 50px;height: 50px;" /></td>
                <td>{if $v['clubInfo']}<a href="?c=paome_club&a=getClubList&paomeId={$paomeId}&name={$v['clubInfo']['title']}">{$v['clubInfo']['title']}</a> {/if}</td>
                <td>{$v['statusMsg']}</td>
                <td>{$v['typeMsg']}</td>
                <td>
                    累计跑量:{$v['bmileage']}km<br />
                    最远跑量：{$v['bMaxMileage']}km<br />
                    平均配速：{$v['bSpeed']}<br />
                    累计人气:{$v['bSupportNum']}
                </td>
                <td>{$v['formatTime']}</td>
                <td>
                    <a href="?c=paome_hall&a=hallUserRecommend&userId={$v['uid']}&optype=1">推荐为代言人</a>
                    <a href="?c=paome_club&a=getUserDetail&paomeId={$paomeId}&clubId={$v['club_id']}&uid={$v['uid']}">详情</a>
                    {if $v['status'] == -1}
                    <input type="text" placeholder="转移战队ID" value=""  style="width:100px;" class="clubIdJs" ids ={$v['uid']} /><button type="button" id="ids_{$v['uid']}" style="margin-top:-10px;">转移</button>
                    {/if}
                </td>
            </tr>

        {/loop}
        <div id="res"></div>
        </tbody>
        {/if}
    </table>

</div>
<div class="pagination">
    <ul>
        {$pageStr}
    </ul>
</div>
<script>
    $("button[id^='ids_']").on('click',function(){
        var  _this = $(this),_id = _this.prev('.clubIdJs').attr('ids'),_clubId =  _this.prev('.clubIdJs').val();
        $.ajax({
            type:'POST',
            url:'index.php?c=paome_club&a=joinAgreeClub',
            data:{uid:_id,clubId:_clubId},
            dataType:'json',
            success:function(d){
                if(d.error != undefined) {
                    alert(d.error.text);
                } else {
                    window.location.reload();
                }
            }
        })

    })
</script>
{template footer}